
<form role="form" class="epii" method="post" data-form="1" action="{url medicine add_edit }">
    {if $adminInfo['role']==1}
    <div class="form-group">
        <label><span style="color: red">*</span>所属医院：</label>
        <select class="selectpicker" name="r[hospital_id]" id="" class="">
            {:options,$hospitals,$info.hospital_id}
        </select>
    </div>
    {/if}
    <div class="form-group">
        <label><span style="color: red">*</span>药品名称：</label>
        <input type="text" class="form-control"  name="r[name]"  value="{? $info.name}" required
               placeholder="请输入药品名称">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>药品简称：</label>
        <input type="text" class="form-control"  name="r[abbr_name]"  value="{? $info.abbr_name}" required
               placeholder="请输入药品简称">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>药品规格：</label>
        <input type="text" class="form-control"  name="r[specs]"  value="{? $info.specs}" required
               placeholder="请输入药品规格">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>常用剂量：</label>
        <input type="number" class="form-control"  name="r[common_does]"  value="{? $info.common_does}" required
               placeholder="请输入常用剂量">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>单价：</label>
        <input type="number" class="form-control"  name="r[price]"  value="{? $info.price}" required
               placeholder="请输入单价">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>单位：</label>
        <input type="text" class="form-control"  name="r[unit]"  value="{? $info.unit}" required
               placeholder="请输入单位">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>进价：</label>
        <input type="number" class="form-control"  name="r[purchase_price]"  value="{? $info.purchase_price}" required
               placeholder="请输入进价">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>库存：</label>
        <input type="number" class="form-control" {if isset($id)&&$id>0}readonly{/if} name="r[inventory]"  value="{? $info.inventory}" required
               placeholder="请输入库存">
    </div>
    <div class="form-group">
        <label><span style="color: red">*</span>预警库存：</label>
        <input type="number" class="form-control"  name="r[alert_inventory]"  value="{? $info.alert_inventory}" required
               placeholder="请输入预警库存">
    </div>
    <div class="form-group">
        <label>排序：</label>
        <input type="number" class="form-control" name="r[sort]"  value="{? $info.sort}"
               placeholder="默认0">
    </div>
    <div class="form-group">
        <label>状态：</label>
        <select class="selectpicker" name="r[status]" id="">
            {:options,$status,$info.status?1}
        </select>
    </div>
    <input type="hidden" name="id" value="{$id?0}">
    <div class="form-footer">
        <button type="submit" class="btn btn-primary">提交</button>
    </div>
</form>
<script src="{$laydate}/laydate.js"></script>
<script type="text/javascript">

    window.onEpiiInit(function() {
    });

</script>
